#include "artist.h"

Artist::Artist(QString name)
{
    this->name = name;
    albums = NULL;
}

QList < Album* > * Artist::getAlbums() const
{
    return albums;
}

void Artist::setAlbums(QList < Album* > * newAlbums)
{
    if(albums == NULL){
        albums = new QList < Album* >();
    }

    albums = newAlbums;

}

QString Artist::getName() const
{
    return this->name;
}

QString Artist::getName()
{
    return this->name;
}

bool Artist::operator==(const Artist &other) const
{

    QString tmp = this->getName();
    if(tmp == other.getName()){
        return true;
    }else{
        return false;
    }
}
